<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="com.amit.Student" %>
<html>

<body>
<h1>Test1.jsp</h1>
<% 

Student st=new Student();
st.setName("amit");
st.setSid(99);
st.setPhone(12345);

session.setAttribute("STUD",st);
%>
<hr/>

<% 
Student std=(Student)session.getAttribute("STUD");
%>
Sid:<%=std.getSid()%><br/>
Name:<%=std.getName()%><br/>
Phone:<%=std.getPhone()%><br/>

</body>
</html>